package com.ybxx.base.service.impl;

import java.util.List;

import com.ybxx.base.dao.BanDao;
import com.ybxx.base.model.Ban;
import com.ybxx.base.model.Community;
import com.ybxx.base.service.BanService;
import com.ybxx.core.command.QueryFilter;
import com.ybxx.core.dao.GenericDao;
import com.ybxx.core.service.impl.BaseServiceImpl;
import com.ybxx.core.web.paging.PagingBean;

public class BanServiceImpl extends BaseServiceImpl<Ban> implements BanService {
	private BanDao banDao;
	public BanServiceImpl(BanDao dao) {
		super(dao);
		this.banDao=dao;
		// TODO Auto-generated constructor stub
	}
	public List<Ban> queryTree(String cid, String loginid){
		String hql="select distinct b from Ban as b,DataRights m where b.bid=m.dvalue and m.dtype='B' and b.community.cid='"+cid+"' and m.user.loginid='"+loginid+"'";
		hql+=" order by b.bname";
		return this.banDao.findByHql(hql, null);
	}
}
